# NoiseSignalç±»æµè¯ç±»
import unittest
import torch
from apps.exp.exp_config import ExpConfig as EG
from apps.exp.source_signal import SourceSignal
from apps.exp.echo_signal import EchoSignal
from apps.exp.noise_signal import NoiseSignal

class TNoiseSignal(unittest.TestCase):
    # python -m unittest -v uts.apps.exp.t_noise_signal.TNoiseSignal.test_generate_signal
    def test_generate_signal(self):
        s = SourceSignal.generate_signal()
        y = EchoSignal.generate_signal(s=s)
        n = NoiseSignal.generate_signal(y=y, SNR_dB=EG.SNR_dB)
        print(f'n: {n.shape}; type: {n.dtype};')